using System;
using System.Collections.Generic;
using System.Text;
using Axe.Logging;
using System.Configuration;

namespace Axe.Logging
{
    public sealed class EventFilterElement : ConfigurationElement
    {
        #region public LogEntryType EventType
        [ConfigurationProperty("eventType", IsRequired = true)]
        public LogEntryType EventType
        {
            get
            {
                return (LogEntryType)base["eventType"];
            }
            set
            {
                base["eventType"] = value;
            }
        }
        #endregion

        #region public EventSinkCollection SinkCollection
        [ConfigurationProperty("listeners", IsDefaultCollection = false)]
        [ConfigurationCollection(typeof(EventSinkCollection),
            AddItemName = "add",
            ClearItemsName = "clear",
            RemoveItemName = "remove")]
        public EventSinkCollection SinkCollection
        {
            get
            {
                EventSinkCollection provCollection =
                (EventSinkCollection)base["listeners"];
                return provCollection;
            }
        }
        #endregion

        public EventFilterElement()
        {

        }
    };
}
